import './assets/main.css'

import { createApp } from 'vue'
import pinia from './stores/piniaInstance'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import axios from 'axios'

import App from './App.vue'
import router from './router'


import { userStatus } from '@/stores/userStatus'

const app = createApp(App)


app.use(pinia)
app.use(router)
app.use(ElementPlus)


// 挂载全局方法
const globalFunc = () => {
    console.log('要挂载在全局的方法')
}

// 将globalFunc方法挂载在全局
app.provide('globalFunc', globalFunc)

app.config.globalProperties.$axios = axios

app.provide('userStore', userStatus())

app.mount('#app')
